package com.gxa.service.impl;

import com.gxa.entity.Subscribe;
import com.gxa.mapper.MakeMapper;
import com.gxa.service.MakeService;
import com.gxa.vo.DcPaIdVo;
import com.gxa.vo.IdDepartmentVo;
import com.gxa.vo.MakeByDepartVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MakeServiceImpl implements MakeService {

    @Autowired
    private MakeMapper makeMapper;

    @Override
    public List<Integer> selectSubType() {
        List<Integer> list = this.makeMapper.selectSubType();
        return list;
    }

    @Override
    public List<IdDepartmentVo> selectBySubType(Integer id) {
        List<IdDepartmentVo> list = this.makeMapper.selectBySubType(id);
        return list;
    }

    @Override
    public List<MakeByDepartVo> selectByDepart(IdDepartmentVo idDepartmentVo) {
        List<MakeByDepartVo> list =this.makeMapper.selectByDepart(idDepartmentVo);
        return list;
    }

    @Override
    public Integer selectDoctorId(String dcName) {
        Integer dcId = this.makeMapper.selectDoctorId(dcName);
        return dcId;
    }

    @Override
    public Integer selectPatientId(String phone) {
        Integer paId = this.makeMapper.selectPatientId(phone);
        return paId;
    }

    @Override
    public String selectPatientmedCard(String phone) {
        String medCard = this.makeMapper.selectPatientmedCard(phone);
        return medCard;
    }

    @Override
    public Integer selectDepartmentId(String name) {
        Integer DeId = this.makeMapper.selectDepartmentId(name);
        return DeId;
    }

    @Override
    public void insertPaIdAnddcId(DcPaIdVo dcPaIdVo) {
        this.makeMapper.insertPaIdAnddcId(dcPaIdVo);
    }

    @Override
    public void insertSubscribe(Subscribe subscribe) {
        this.makeMapper.insertSubscribe(subscribe);
    }
}
